﻿<link href="@Url.Content("~/content/activitie_detail.css")" rel="stylesheet" type="text/css"/>
<link href="@Url.Content("~/content/table_btn.css")" rel="stylesheet" type="text/css"/>

<!--[if lte IE 8]>
    <link href="@Url.Content("~/content/activitie_create.css")" rel="stylesheet" type="text/css"/>
<![endif]-->

<noscript>
    <link href="@Url.Content("~/content/activitie_create.css")" rel="stylesheet" type="text/css"/>
    <link href="@Url.Content("~/content/activitie_noscript.css")" rel="stylesheet" type="text/css"/>
</noscript>

@model PessModel.Activity

@{
    ViewBag.Title = "活动基本信息";
}

@*@Html.Partial("_ActivityNavPartial",Model.ID)*@

<h2>基本信息</h2>

<div id="operate">
    @if (Roles.IsUserInRole(Membership.GetUser().UserName, "Admin") )
    {
        @Html.ActionLink("编辑", "Edit", new { id = Model.ID })<span>&#8195;</span>
        @Html.ActionLink("评分进度","Progress",new { activityID = Model.ID })
    }
    &#8195;@Html.ActionLink("返回", "Index")
</div>
<fieldset>
    <div class="displayHead">
        @Html.DisplayFor(model => model.Name)
    </div>
    <div class="displayDesc_long">
        @*@Html.DisplayFor(model => model.Description)*@
        @if(!Roles.IsUserInRole("CountyAdmin"))
        {
            @Html.Raw(Model.Description)
        }
    </div>
    
    @if(Roles.IsUserInRole("Admin"))
    {    
    <div class="displayYear">
        行政年度：@Html.DisplayFor(model => model.AdminYear)
    </div>
    <div class="displayYear">
        @{
            var status=(PessModel.ActivityStatus)Model.Status;
            var statusLocalName=status.ToLocalName();
        }
        活动状态：@Html.DisplayFor(model =>statusLocalName)
    </div>
    <div class="displaySTime">
        活动开始日期：@Html.DisplayFor(model => model.StartDate)
    </div>
    <div class="displayDTime">
        活动结束日期：@Html.DisplayFor(model => model.DueDate)
    </div>
    }
    @if(Roles.IsUserInRole("Admin")||Roles.IsUserInRole("ExpertJudge"))
    {
    <div class="displaySTime">
        评审开始日期：@Html.DisplayFor(model => model.ReviewStartDate)
    </div>
    <div class="displayDTime">
        评审结束日期：@Html.DisplayFor(model => model.ReviewDueDate)
    </div>
    }
    @if(Roles.IsUserInRole("Admin")||Roles.IsUserInRole("CountyAdmin"))
    {
    <div class="displaySTime">
        申报开始日期：@Html.DisplayFor(model => model.UploadStartDate)
    </div>
    <div class="displayDTime">
        申报结束日期：@Html.DisplayFor(model => model.UploadDueDate)
    </div>
    }
    @if(Roles.IsUserInRole("Admin"))
    {
     <div class="displayDTime">
        活动类型：@Html.DisplayFor(model => model.PessType.Name)
    </div>
    }
        
    @if(Roles.IsUserInRole("Admin"))
    {
    <div class="displayCoordinate">
        <p>进度表 （配额 | 上传数量）</p>
        @Html.PivotTable((System.Data.DataTable)ViewData["StatusTable"],"SubjectName","CountyName",new string[] { "Quota","Uploaded" })
    </div>
    }
</fieldset>
